package com.example.exception.controller;

import com.example.exception.vo.MsgVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class IndexController {

    @RequestMapping("/errors")
    public String error() {
        int a = 1 / 0;
        return "error";
    }

    @RequestMapping("/ajaxerror")
    public String ajaxerror() {
        return "ajaxerror";
    }

    @RequestMapping("/getAjaxerror")
    @ResponseBody
    public MsgVO getAjaxerror() {

        int a = 1 / 0;

        return MsgVO.success();
    }
}
